import { reactive, ref } from "vue";

export default function InitHook() {
  const tableRef = ref<any>(null);
  const searchForm = reactive<Partial<CustomerManagement.SearchForm>>({
    companyName: undefined,
    shortName: undefined,
    bizId: undefined,
    followId: undefined,
    createTime: [],
    pageNum: 1,
    pageSize: 100,
    total: 0
  });
  const tableData = ref<Array<CustomerManagement.ListRows>>([]);
  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "",
    width: "520px",
    component: "",
    type: 1,
    passData: {},
    visible: false
  });
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    type: 1,
    passData: {},
    visible: false
  });
  return {
    searchForm,
    tableData,
    drawerOpts,
    tableRef,
    dialogOpts
  };
}
